<!DOCTYPE html>
<html><head>
<title>HTML KickStart</title>
<meta charset="UTF-8">
<meta name="description" content="" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script type="text/javascript" src="js/prettify.js"></script>                                   <!-- PRETTIFY -->
<script type="text/javascript" src="js/kickstart.js"></script>                                  <!-- KICKSTART -->
<link rel="stylesheet" type="text/css" href="css/kickstart.css" media="all" />                  <!-- KICKSTART -->
<link rel="stylesheet" type="text/css" href="style.css" media="all" />                          <!-- CUSTOM STYLES -->
</head><body><a id="top-of-page"></a><div id="wrap" class="clearfix">
<!-- ===================================== END HEADER ===================================== -->


	
	<div class="col_12">
		
		<h1>Новости этой страны</h1>

		

		<!-- Menu Horizontal -->
		<ul class="menu">
		
			<li <?php if ($id==1) { ?> class="current" <?php }  ?>><a href="?id=1">Hi-tech</a></li>
			<li <?php if ($id==2) { ?> class="current" <?php }  ?>><a href="?id=2">Наука</a></li>
			<li <?php if ($id==3) { ?> class="current" <?php }  ?>><a href="?id=3">Спорт</a></li>
			<li <?php if ($id==4) { ?> class="current" <?php }  ?>><a href="?id=4">История</a></li>
			<li <?php if ($id==5) { ?> class="current" <?php }  ?>><a href="?id=5">Искусство</a></li>
		</ul>


	</div>
	
 <?php 
  if ($news != null){
   while ($line = mysql_fetch_array($news, MYSQL_ASSOC)) {	?>
   <div class="col_12">
	<h4><?php echo $line['title'];?> </h4>
	<em><?php echo $line['added_date']; ?></em>
	<p>
			<img class="align-left" src="http://placehold.it/100x100/4D99E0/ffffff.png&text=100x100" width="100" height="100" />
	        <?php echo $line[story_full];?>
	</p>

    </div>
	
   
    <?php } } ?>
	
	 
	<?php 
     if ($result != null) {
       $line =  mysql_fetch_row($result, MYSQL_ASSOC);
	  if ($line['title'] == null) {echo "<h4>Новостей нет.",$line['title'],"</h4>";} 
		  while ($line !=null  ) {	?>
	<div class="col_12">
	<h4><?php echo $line['title'];?> </h4>
	<em><?php echo $line['added_date']; ?></em>
	<p>
			<img class="align-left" src="http://placehold.it/100x100/4D99E0/ffffff.png&text=100x100" width="100" height="100" />
	        <?php echo $line[story_short];?>
            <a href="<?php echo "?news=",$line['id'];?>">Read more</a>
	</p>

    </div>
	
   
    <?php $line = mysql_fetch_row ($result, MYSQL_ASSOC); } }?>
	
	
	


	<div class="col_12">
		<ul class="button-bar">
			<li><a href="<?php echo $v;?>page=1">1</a></li>
			<li><a href="<?php echo $v;?>page=2">2</a></li>
			<li><a href="<?php echo $v;?>page=3">3</a></li>
			<li><a href="<?php echo $v;?>page=4">4</a></li>
			<li><a href="<?php echo $v;?>page=5">5</a></li>
			<li><a href="<?php echo $v;?>page=6">6</a></li>
			<li><a href="<?php echo $v;?>page=7">7</a></li>
			<li><a href="<?php echo $v;?>page=8">8</a></li>
			<li><a href="<?php echo $v;?>page=9">9</a></li>
			<li><a href="">next 10 ...</a></li>
			
		</ul>
	</div>

<!-- ===================================== START FOOTER ===================================== -->
</div>

</div><!-- END WRAP -->
</body></html>